package com.qf.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lixu
 */
@RestController
@RefreshScope //刷新 域注解    不停止维护的动态变更注解
public class HelloController {

/*    @Value("${spring.redis.host}")
    private String host;*/

//  动态变更 不停机维护
    @Value("${version}")
    private String version;
    /**
     * spring:
     *   redis:
     *     host: 192.168.200.129
     *     port: 6379
     */
    @GetMapping("/hello")
    public String hello(){
        return "=====" + version;
    }
}
